package org.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.example.entity.Candidateresume;

import java.util.List;

public interface CandidateresumeMapper extends BaseMapper<Candidateresume> {
    List<Candidateresume> resumeInquiryDepartment(String status);

    List<Candidateresume> queryBasedOnTheDemandStatusAndJobName(@Param("status") String status, @Param("jobName") String jobName, @Param("requirements") String requirements);

    List<Candidateresume> queryResumeRequirementsBasedOnStatus(@Param("status") String status,
                                                               @Param("candidatename") String candidatename,
                                                               @Param("intendedPosition") String intendedPosition);

    List<Candidateresume> queryResumeRequirementsBasedOnStatusAscendingOrder(@Param("status") String status,
                                                                             @Param("candidatename") String candidatename,
                                                                             @Param("intendedPosition") String intendedPosition);

    List<Candidateresume> queryResumeRequirementsBasedOnStatusDescendingOrder(@Param("status") String status,
                                                                              @Param("candidatename") String candidatename,
                                                                              @Param("intendedPosition") String intendedPosition);

    List<Candidateresume> selectCandidateWithInterviewByCandidateId(@Param("CandidateID") String CandidateID);

    List<Candidateresume> reviewTheResumeAsNeeded(@Param("status") String status,
                                                  @Param("demandId") String demandId);

    int updateResumeStatusById(@Param("resumeStatus") String resumeStatus, @Param("candidateid") String candidateid);

    List<Candidateresume> selectCandidateResumesWithDeptStruct(@Param("status") String status);

    List<Candidateresume> searchCandidateResumesByStatusAndNameOrPost(@Param("status") String status,
                                                                      @Param("candidateName") String candidateName,
                                                                      @Param("postsName") String postsName);

    List<Candidateresume> searchCandidateResumesByStatusAndNameOrPostASC(@Param("status") String status,
                                                                         @Param("candidateName") String candidateName,
                                                                         @Param("postsName") String postsName);

    List<Candidateresume> searchCandidateResumesByStatusAndNameOrPostDESC(@Param("status") String status,
                                                                          @Param("candidateName") String candidateName,
                                                                          @Param("postsName") String postsName);
}